//
//  maopaokuangren.m
//  C5_请叫我冒泡狂人
//
//  Created by Annie~ on 14-8-20.
//  Copyright (c) 2014年 lanou3g.com 蓝鸥科技. All rights reserved.
//

#import "maopaokuangren.h"
void bubbleSort(int array[], int count)
{
    for (int i = 0; i < count - 1; i++) {
        for (int j = 0;j < count - 1 - i; j++) {
            if (array[j] > array[j + 1]) {
                int temp = array[j];
                array[j] = array[j + 1];
                array[j + 1] = temp;
            }
        }
    }
}
void randomArray(int array[], int count, int max, int min)
{
    for (int i = 0; i < count; i++) {
        array[i] = arc4random() % (max - min + 1) + min;
    }
}
void printArray(int array[], int count)
{
    for (int i = 0; i < count; i++) {
        printf("%d ", array[i]);
    }
    printf("\n");
    
}
void bubuleSort(int array[], int count)
{
    for (int i = 0; i < count - 1; i++) {
        for (int j = 0; j < count - 1 - j; j++) {
            if (array[j] > array[j + 1]) {
                int temp = array[j];
                array[j] = array[j + 1];
                array[j + 1] = temp;
                
            }
        }
    }
}
void printArray(int array[], int count)
{
    for (int i = 0; i < count; i++) {
        printf("%d",array[i]);
    }
    printf("\n");
}
void randomArray(int array[],int count ,int max ,int min)
{
    for (int; i < count; i++) {
        array[i] = arc4random() % (max -min - 1) + min;
        
    }
}